package gdt.dao.jpa;

import java.util.List;

import gdt.dao.TaskDAO;
import gdt.entity.Category;
import gdt.entity.Member;
import gdt.entity.Task;

public class JPATaskDAO extends JPAGenericDAO<Task, Long> implements TaskDAO {

	@SuppressWarnings("unchecked")
	public List<Task> findByCategoryAndUser(Category category, Member member) {
		return getEntityManager().createNamedQuery("findTasksByCategoryAndUser").setParameter("category", category).setParameter("member", member).getResultList();
	}
	
}
